package org.xp.judgeplatform.pojo.dto.UserDTO;

import lombok.Data;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

@Data
@Schema(description = "用户资料更新请求")
public class UserProfileDTO {
    
    @JsonProperty("email")
    @Email(message = "邮箱格式不正确")
    @Schema(description = "邮箱", example = "user@example.com")
    private String email;
    
    @JsonProperty("phone")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Schema(description = "手机号", example = "13812345678")
    private String phone;
    
    @JsonProperty("intro")
    @Size(max = 500, message = "个人简介不能超过500个字符")
    @Schema(description = "个人简介", example = "这是我的个人简介")
    private String intro;
}